package org.xcorpio.thread;

//ThreadTest.java 源码
class MyThread2 extends Thread {
	public void run() {
		synchronized (this) {
			for (int i = 0; i < 10; i++) {
				System.out.println(Thread.currentThread().getName()
						+ "========" + i);
			}
		}
	}
};

public class ThreadTest2 {
	public static void main(String[] args) {
		MyThread2 t1 = new MyThread2();
		MyThread2 t2 = new MyThread2();
		MyThread2 t3 = new MyThread2();
		t1.start();
		t2.start();
		t3.start();
	}
}